Date and Time Format
With the Date and
Time Format configuration option, you can choose whether the users can
choose just a date or a date and time. This choice changes what the
date-choosing control looks like.
Default Value
You
have the option to choose a specific date or make the current date the
default. Also, you can use the Calculate Value option and set a default
that calculates based on the current date using the [Today] token. For
example, to set the default to be two weeks from the current date, type
[Today] +14 in the Calculated Value box. This capability is useful when
you want to use a column as an expiration date, for example, while
allowing the users to change the expiration date. You can set the
default value to be two weeks in the future from creating the list item
or file, but the user can still change the date manually.
Note
If a user just selects a
time and not a date, SharePoint doesn’t save anything in the column. To
avoid this, you should set a default date value for the column.
Lookup (Information Already on This Site)
Lookup is one of the most useful column types. It is similar to the
Choice column type in that the users get to choose from a list of
values. However, unlike the
Choice column type, the Lookup column type does not store the choices
in the settings of the column. Instead, the choices are in another list
or library.
For example, if you create a
SharePoint list in a site and enter a list of countries in that list,
you can use the Lookup column type to show values from that list. This
feature is helpful when you want other users to be able to manage the
list of choices. The other users do not need permissions to change
settings on the current list; they just need permissions to change
items or files in the list of values (the remote list).
Unlike the Choice column type,
though, in the Lookup column, the values that users choose show up as
links to the list item or file selected. This can help create a
complicated system of lists connected to one another (for example, a
list of orders connected to a list of products). When users create a
new order, they can choose a product or products, and when they view an
order, the product name appears as a link to the product list item.
You can configure a
Lookup column to display additional columns from the list it is looking
up to. For example, in an orders list, instead of just seeing the name
of the product for an order, you can also see the product ID or when
the product expires, as if these were separate columns in the list you
added the lookup column to.
Finally, the Lookup column
can enforce relationship behavior. It can control the relationship
between the two lists selected. For example, you might want to restrict
deleting products while there are still orders referring to those
products. This option allows you to do that, and it is explained in
more detail later in this chapter.
Figure 19 shows the configuration options for this column type.
Get Information From
In
the Get Information From field, you specify which list has the
information you want to display to the user. The choices here are the
available lists in the current site. It is not possible to reference a
list from another site.
In This Column
In the In This Column
configuration option, you specify which column in the list to which you
are connecting will be displayed to the user as the possible values.
For example, the most common choice for this setting is the Title
column, which displays the titles of the list items or files as the
options for the user to choose from.
Allow Multiple Values
As you can do with the Choice
column, you can have the Lookup column enable users to choose more than
one value. When you select the Allow Multiple Values option, the user
interface for selecting values changes, allowing the users to select
multiple values, as shown in Figure 20.
Note
Selecting Allow Multiple Values disables the Enforce Unique Values and Enforce Relationship Behavior settings.
Add a Column to Show Each of These Additional Fields
As mentioned earlier, you can configure a Lookup column to display more than just one column (the one selected in the “In This Column”
section, mentioned earlier). The additional columns are displayed to
users in list views and when viewing the properties of the list items
or files, but they are not displayed to users who are editing the
properties because they are part of the Lookup column.
The additional columns are displayed with the name of the Lookup column before them, as shown in Figure 21.
Note
Not all columns from the
looked-up list are available to display under this section. This
feature supports only columns from certain column types (for example
date, Number and Single Line of Text column types).
Yes/No (Check Box)
The Yes/No column type is one
of the simplest column types available. It enables the user to select
either Yes or No by selecting or clearing a check box. The only
configuration option you can set for this column type is the default
value for it: Choose either Yes or No.
Note
A
common problem that a lot of people have when creating forms in
SharePoint is how to add a check box for the user to agree to
conditions before saving the form (or a similar requirement). This
requirement can be answered with a Yes/No column, combined with list
validation , or it can be achieved with the Choice column
type: You simply specify just one choice (I Agree, for example) and
make the column mandatory.